package com.taoxi.good.domain;

import com.taoxi.common.annotation.Excel;
import com.taoxi.common.core.domain.BaseEntity;
import com.taoxi.shops.domain.Store;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 商品展示对象 good
 *
 * @author ruoyi
 * @date 2024-10-21
 */
public class Good extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    private Long id;

    /**
     * 店铺ID
     */
    @Excel(name = "店铺ID")
    private Long storeId;

    /**
     * skuID
     */
    @Excel(name = "skuID")
    private String skuId;

    /**
     * 分类ID
     */
    @Excel(name = "分类ID")
    private Long categoryId;

    /**
     * 图片ID
     */
    @Excel(name = "图片ID")
    private Long imageId;

    /**
     * 商品描述
     */
    @Excel(name = "商品描述")
    private String description;

    /**
     * 商品价格
     */
    @Excel(name = "商品价格")
    private BigDecimal price;

    /**
     * 商品材料
     */
    @Excel(name = "商品材料")
    private String material;

    /**
     * 商品销量
     */
    @Excel(name = "商品销量")
    private Long sales;

    /**
     * 商品状态（0未审核 1已通过 2未通过）
     */
    @Excel(name = "商品状态", readConverterExp = "0=未审核,1=已通过,2=未通过")
    private String status;

    /**
     * 上下架状态(0下架 1上架)
     */
    @Excel(name = "上下架状态(0下架 1上架)")
    private String isOnShelf;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String goodName;
    private Category category;
    private GoodImg image;
    private GoodSku sku;
    private Store store;

    public GoodImg getImage() {
        return image;
    }

    public void setImage(GoodImg image) {
        this.image = image;
    }

    public Store getStore() {
        return store;
    }

    public void setStore(Store store) {
        this.store = store;
    }

    public GoodSku getSku() {
        return sku;
    }

    public void setSku(GoodSku sku) {
        this.sku = sku;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public String getSkuId() {
        return skuId;
    }

    public void setSkuId(String skuId) {
        this.skuId = skuId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getImageId() {
        return imageId;
    }

    public void setImageId(Long imageId) {
        this.imageId = imageId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getMaterial() {
        return material;
    }

    public void setMaterial(String material) {
        this.material = material;
    }

    public Long getSales() {
        return sales;
    }

    public void setSales(Long sales) {
        this.sales = sales;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIsOnShelf() {
        return isOnShelf;
    }

    public void setIsOnShelf(String isOnShelf) {
        this.isOnShelf = isOnShelf;
    }

    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("storeId", getStoreId())
                .append("skuId", getSkuId())
                .append("categoryId", getCategoryId())
                .append("imageId", getImageId())
                .append("description", getDescription())
                .append("price", getPrice())
                .append("material", getMaterial())
                .append("sales", getSales())
                .append("status", getStatus())
                .append("isOnShelf", getIsOnShelf())
                .append("updateTime", getUpdateTime())
                .append("createTime", getCreateTime())
                .append("goodName", getGoodName())
                .append("category", getCategory())
                .append("image", getImage())
                .append("store", getStore())
                .append("sku", getSku())
                .toString();
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }
}
